package com.wey.springboot.config;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBatisConfig {
  // resultType=map 时，下划线转驼峰
  @Bean
  public ConfigurationCustomizer mybatisConfigurationCustomizer() {
    return configuration -> configuration.setObjectWrapperFactory(new MybatisMapWrapperFactory());
  }
}
